There is a way to solve it. Eliminate or drastically reduce your encounters with the police. How? Don’t break the law
Could it be that non-white people have a higher chance to be approached by police, whether or not they are law-abiding?
Could it be that more frequent run ins with police isn't just a matter of being law-abiding, but also (partly) by reason of racial bias?
https://openpolicing.stanford.edu/findings/
Could it be that if upstanding citizen Johnny White is stopped for nothing once, he is slightly annoyed, while upstanding citizen Johnny Brown, who is stopped for nothing for the 10th time this year may be slightly more likely to let the officer know he's really pissed off, and antagonize the officer with his words?
And without regards to race: do people who commit minor crimes deserve to die for that? Why do police on the USA kill so many people when compared to other Western countries? https://en.wikipedia.org/wiki/List_of_killings_by_law_enforcement_officers_by_country
Might it be possible there are some systemic issues beyond "well they shouldn't break the law if they don't want to be killed by police"?